<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns="http://apache.org/cocoon/source/1.0" xmlns:source="http://apache.org/cocoon/source/1.0"  version="1.0">

  <!-- 
  Instruct the sourcewriting transformer to delete the written sitemaps
  
  Authors: Jan Willem Boer <janwillem@jwenr.nl>
  -->
  <xsl:template match="sourceResult|source:sourceResult"> <!-- unfortunately, this is not the same. -->
    <source:delete>
      <xsl:apply-templates select="source|source:source"/>
    </source:delete>
  </xsl:template>

  <xsl:template match="source|source:source">
    <source:source>
      <xsl:value-of select="."/>
    </source:source>
  </xsl:template>

  <!-- copy everything else -->
  <xsl:template match="node()|@*">
    <xsl:copy>
      <xsl:copy-of select="@*"/>
      <xsl:apply-templates select="node()"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>
